import textwrap
from typing import Final, final

from django.db import models

#: That's how constants should be defined.
_POST_TITLE_MAX_LENGTH: Final = 80


@final
class Todolist(models.Model):
    title = models.CharField(max_length=_POST_TITLE_MAX_LENGTH)
    description = models.TextField()
    is_done = models.BooleanField(default=False)

    objects = models.Manager()

    def __str__(self) -> str:
        """All django models should have this method."""
        return '<Todolist: {0}>'.format(self.title)
